/**
 * Copyright &copy; 2012-2015  All rights reserved.
 */
package com.smartwork.common.mobile.wechat.service;

import com.smartwork.common.mobile.wechat.bean.WechatInfo;
import com.smartwork.common.mobile.wechat.dao.WechatInfoDao;
import com.smartwork.common.persistence.Page;
import com.smartwork.common.service.CrudService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * WechatInfoService
 * @author wj
 * @version 2016-06-30
 */
@Service
@Transactional(readOnly = true)
public class WechatInfoService extends CrudService<WechatInfoDao, WechatInfo> {

	public WechatInfo get(String id) {
		return super.get(id);
	}
	
	public List<WechatInfo> findList(WechatInfo wechatInfo) {
		return super.findList(wechatInfo);
	}
	
	public Page<WechatInfo> findPage(Page<WechatInfo> page, WechatInfo wechatInfo) {
		return super.findPage(page, wechatInfo);
	}
	
	@Transactional(readOnly = false)
	public void save(WechatInfo wechatInfo) {
		super.save(wechatInfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(WechatInfo wechatInfo) {
		super.delete(wechatInfo);
	}

    public WechatInfo getByOpenId(String openId){
        return dao.getByOpenId(openId);
    }
	
}